package com.lh.createData.service.Impl;

import com.lh.createData.dao.UseTimeLenTempMapper;
import com.lh.createData.model.InPutParam.UseTimeLenTempInParam;
import com.lh.createData.model.UseTimeLenTempGroupModel;
import com.lh.createData.service.UseTimeLenTempService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ：梁昊，后端工程师：梁昊
 * @create 2021-07-27 18:03
 * @function
 * @editLog
 */
@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
@Service
public class UseTimeLenTempServiceImpl implements UseTimeLenTempService {
    @Autowired
    UseTimeLenTempMapper useTimeLenTempMapper;

    /**
     * 增加用户时长暂时表
     *
     * @param useTimeLenTempInParam com.lh.createData.model.InPutParam.UseTimeLenTempInParam
     * @return 影响条数
     */
    @Override
    public int deleteUseTimeLenTemp (UseTimeLenTempInParam useTimeLenTempInParam) {
        return useTimeLenTempMapper.deleteUseTimeLenTemp(useTimeLenTempInParam);
    }

    /**
     * 增加用户时长暂时表
     *
     * @param useTimeLenTempInParam com.lh.createData.model.InPutParam.UseTimeLenTempInParam
     * @return 影响条数
     */
    @Override
    public int insertUseTimeLenTemp (UseTimeLenTempInParam useTimeLenTempInParam) {
        return useTimeLenTempMapper.insertUseTimeLenTemp(useTimeLenTempInParam);
    }

    /**
     * 增加用户时长暂时表
     *
     * @param batchId 批次号
     * @return 影响条数
     */
    @Override
    public List<UseTimeLenTempGroupModel> selectUseTimeLenTempGroupByBatchId(String batchId) {
        return useTimeLenTempMapper.selectUseTimeLenTempGroupByBatchId(batchId);
    }

}